Original: https://redislabs.com/ebook/redis-in-action/part-2-core-concepts-2/ Chapter-5-using-redis-for-application-support/5-3-ip-to-city-and-country-lookupWhen we have collected statistical information and logs to Redis, we have collected
Summary
The IP database on the network is the most popular with the pure version, LUMAQQ also uses the pure version IP database as the basis of the IP query function. However, the document on its format is very small, and then finally found a
Based on the IP address of the Java implementation, can be \ t-delimited IP, address format (beginning ip\t end of the ip\t country \ \ \ n) into an ascending binary format, through a binary lookup can be found in the 50-150MS IP address information.
How to use: Ipsearch.getaddresswithip ("202.96.128.167")
CS Class Code
Copy Code code as follows:
Using System;
Using System.Data;
Using System.Configuration;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using
Use GeoIP2 to analyze visitors' IP addresses to obtain geographical location information.
Link: http://blog.csdn.net/johnnycode/article/details/42028841
MaxMind GeoIP2 is widely used to identify locations and other features of Internet users, this
Make method one, use IP138 database to query domain name or IP address corresponding geographical location.
#-*-coding:gbk-*-
import urllib2
import re
try: While
True:
ipaddr = Raw_input ("Enter IP Or Domain Name: ")
if ipaddr = =" ""
Originally wanted to call Ali's IP interface to query IP attribution. The results found that Ali's interface is not very powerful, mainly inaccurate, but is free of charge and has regional and ISP information. The following is the implementation
If you want to find the actual geographic location of an IP address on the earth, you can use many online GeoIp lookup services (such as geoiptool.com ). Most of these online services are supported by a free GeoIP database such as MaxMind. While
If you want to find the actual geographic location of an IP address on the Earth, you can use many online GeoIp lookup services (such as geoiptool.com ). Most of these online services are supported by a free GeoIP database such as MaxMind. When
Original link: http://blog.csdn.net/johnnycode/article/details/42028841MaxMind GeoIP2 Services can identify the location and other characteristics of Internet users, including personalized content, fraud detection, advertising targeting, website
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.